package com.sharkburner.common.component;

import com.sharkburner.common.listener.ButtonListener;
import com.sharkburner.common.listener.RemoveListener;
import com.vaadin.ui.Button;

/**
 * Remove button
 * 
 * @author inartea
 *
 */
public class RemoveButton extends Button implements CustomMenuComponent{

	private RemoveListener listener;
	
	public RemoveButton() {
		super("Remove");
		// TODO : set icon

		addListener(new Button.ClickListener() {
			public void buttonClick(ClickEvent event) {
				listener.remove();
			}
		});
	}
	
	public void setListener(RemoveListener listener){
	}

	public void setListener(ButtonListener listener) {
		this.listener=(RemoveListener) listener;
	}
}
